package com.cnnp.dip.business.service.impl;

import com.cnnp.dip.api.client.GrafanaSearchApi;
import com.cnnp.dip.business.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SearchServiceImpl implements SearchService {

    @Autowired
    GrafanaSearchApi grafanaSearchApi;

    @Override
    public List<Map<String, Object>> searchDashboards() {
        return grafanaSearchApi.searchDashboards("dash-db");
    }
}
